// pages/account-book/childCpns/book-list/book-list.js
const app = getApp();

Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    bookList: app.globalData.bookInfo,
    currentIndex: 0
  },
  pageLifetimes:{
    show: function(){
      this.setData({
        bookList: app.globalData.bookInfo
      })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleClick: function(e){
      console.log(this.data.bookList)
      this.setData({
        currentIndex: e.currentTarget.dataset.index
      })
    },
    handleSwitch: function () {
      console.log("pages/bill/bill")
      wx.switchTab({
        url: '/pages/bill/bill'
      })
    }
  } 
})
